<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.com">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" />
</head>
<body>
    <!-- 顶部导航 -->
    <!-- <div th:include="common/header"></div> -->

    <div class="container clearfix">
        <!-- 左侧菜单 -->
        <!-- <div th:include="common/menu"></div> -->

        <!--/sidebar-->
        <div class="main-wrap">
            <div class="crumb-wrap">
                <div class="crumb-list">
                    <i class="icon-font">&#xe926;</i>
                    <a href="javascript:void(0);">商家项目管理</a>
                    <span class="crumb-step">&gt;</span>
                    <span class="crumb-name">商家项目列表</span>
                </div>
            </div>
            <div class="search-wrap">
                <div class="search-content">
                    <form th:action="@{/projectInfo/merchantList}" method="post" id="queryForm">
                        <table class="search-tab" style="margin-left: 10px;">
                            <tr>
                                <th width="70">项目名称:</th>
                                <td>
                                    <input class="common-text" placeholder="项目名称" name="projectName" th:value="${projectName }" type="text" />
                                </td>
                                
                                <th width="70">项目状态:</th>
                                <td>
                                	<select name="status" id="status"  style="height: 30px; width: 200px;">
	                                	<option value="">全部</option>
                                        <option value="1" th:selected="${status == 1}">待审</option>
                                        <option value="2" th:selected="${status == 2}">通过</option>
                                        <option value="3" th:selected="${status == 3}">驳回</option>
									</select>
									
									<!-- <option th:each="good:${goodsList}" th:value="${good?.goodsId}" th:text="${good.title}"></option> -->
                                </td>
                                <td>
                                    <input class="btn btn-primary btn2" name="sub" value="查询" type="submit">
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
            <div class="result-wrap">
                <div class="result-title">
                    <div class="result-list">
                        <a th:href="@{/projectInfo/add?marker=2}" href=""><i class="icon-font">&#xea0a;</i>新增项目</a>
                        <a id="batchDel" href="javascript:batchDeleteProjects();"><i class="icon-font">&#xe9ac;</i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" onclick="javascript:shiro.form.setCheckBoxSelectToggle('projectInfoIdCheckBox');" type="checkbox" /></th>
                            <th width="15%">项目名称</th>
                            <th width="15%">项目价格</th>
                            <th width="15%">项目介绍</th>
                            <th width="10%">项目状态</th>
                            <th width="15%">创建时间</th>
                            <th class="tc" width="10%">操作</th>
                        </tr>

                        <tr th:each="project:${projectList}">
                            <td class="tc">
                                <input name="projectInfoIdCheckBox" th:value="${project?.projectId}" type="checkbox" />
                            </td>
                            <td th:text="${project?.name }"></td>
                            <td th:text="${project?.price }"></td>
                            <td th:text="${project?.desc }"></td>
                            <td th:if="${project?.status }==3" th:text="驳回"></td>
                            <td th:if="${project?.status }==2" th:text="通过"></td>
                            <td th:if="${project?.status }==1" th:text="待审"></td>
                            <td th:text="${#dates.format(project?.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td class="tc">
                                <a th:if="${project?.status } != 2" class="link-update" th:href="@{'/projectInfo/edit/' + ${project?.projectId}+'?marker=2'}">修改</a>
                                <a th:if="${project?.status } != 2"  class="link-del" th:href="'javascript:deleteProject(\'' + ${project?.projectId } + '\');'">删除</a>
                            </td>
                        </tr>
                    </table>

                </div>
                <div class="list-page" th:utext="${pageHtml}">
                </div>
            </div>
        </div>
    </div>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" th:src="@{/js/web/projectInfo/projectInfo.js}"></script>
</body>
</html>